/*******************************************************************************
 *
 * Copyright (c) 2008-2011 ayound@gmail.com, guwei8576431@gmail.com
 * This program and the accompanying materials
 * are made available under the terms of the GNU GENERAL PUBLIC LICENSE 
 * which accompanies this distribution, and is available at
 * http://dev.perl.org/licenses/gpl1.html
 * All rights reserved.
 * 
 * Created on 2009-10-15
 *******************************************************************************/

package org.cgtw.scriptprofile.ui.manager;

import java.awt.Toolkit;
import java.util.Locale;

import javax.swing.SwingUtilities;
import javax.swing.UIManager;

import org.cgtw.scriptprofile.ui.ScriptProfileMainFrame;


/**
 * use to manage the UI
 */
public class ScriptProfileUIManager {
	private static ScriptProfileMainFrame mainFrame;

	
	/**
	 * open the main frame of script_profile tool
	 */
	public static void runUI(){
		Toolkit.getDefaultToolkit().setDynamicLayout(true);
		final Locale locale = Locale.getDefault();

		SwingUtilities.invokeLater(new Runnable() {
			public void run() {
				try {
					UIManager.setLookAndFeel(UIManager.
							getCrossPlatformLookAndFeelClassName());
				} catch (Exception e) {
					e.printStackTrace(); // Never happens
				}
				mainFrame = new ScriptProfileMainFrame(locale);
				mainFrame.setVisible(true);
			}
		});
		
	}
	
	public static void updateUI(Locale locale){
		
	}

}
